package com.yang.SpringTest.annotation.beanLearn;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>bean测试类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.bean
 * Ceate Time 2024-03-12 16:14
 */
@Slf4j
public class BeanDemoTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(BeanDemoConfig.class);
        log.info("**************** IOC容器启动完成....");

        BeanDemo demo1 = context.getBean(BeanDemo.class);
        BeanDemo demo2 = context.getBean(BeanDemo.class);

        log.info("**************** demo1是否等于demo2 ==>{}", (demo1 == demo2));

        context.close();
    }
}
